<template>
  <div style="padding: 20px 15%">
    <v-row>
      <v-col cols="4" class="px-8">
        <Info @click="flushCom"></Info>
      </v-col>
      <v-col cols="8">
        <List :cateId="cateId" :tagId="tagId" :searchValue="searchValue"></List>
      </v-col>
    </v-row>
  </div>
</template>
<script>
import List from "./components/home/List";
import Info from "./components/home/Info";
export default {
  props: ["searchValue"],
  components: {
    List,
    Info,
  },
  data() {
    return {
      cateId: 0,
      tagId: 0,
      listHeight: document.documentElement.clientHeight,
    };
  },
  mounted() {
    window.onresize = () => {
      this.listHeight = document.documentElement.clientHeight;
    };
  },
  methods: {
    flushCom(id, type) {
      if (type == 1) {
        this.cateId = id;
      }
      if (type == 2) {
        this.tagId = id;
      }
    },
    search(val) {
      this.searchValue = val;
    },
  },
};
</script>
